import request from "@/utils/request"

// 登录
export const login = data => {
    return request({
        method: "POST",
        url: "/api/users/login",
        data
    })
}

// 注册
export const register = data => {
    return request({
        method: 'POST',
        url: '/api/users',
        data
    })
}

// 获取文章列表
export const getArticles = params => {
    return request({
        method: 'GET',
        url: '/api/articles',
        params
    })
}


// 获取文章标签列表
export const getTags = () => {
    return request({
        method: 'GET',
        url: '/api/tags'
    })
}
